Skip to content

fix(docs): move pages out of pages/ to restore original guide URLs#814

Merged
henryiii merged 1 commit into
mainfrom
claude/objective-nash-e43585
Jun 23, 2026
Merged

fix(docs): move pages out of pages/ to restore original guide URLs#814
henryiii merged 1 commit into
mainfrom
claude/objective-nash-e43585

Conversation

@henryiii

@henryiii henryiii commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

What

The mystmd conversion (#792) nested every page under docs/pages/, which added a pages/ segment to all guide URLs. For example:

  • before: https://learn.scientific-python.org/development/guides/mypy/
  • after: https://learn.scientific-python.org/development/pages/guides/mypy/

That broke every existing link into the development guide (and the mk_url-generated check links pointed at the old paths).

This moves the page tree back up one level so the URLs match the original, pre-mystmd paths — old links work again, and no redirects are needed.

Changes

  • git mv docs/pages/{guides,tutorials,principles,patterns,index.md}docs/ (tracked as renames)
  • strip pages/ from the toc in docs/myst.yml and from internal cross-reference links in the markdown
  • adjust the real {include} directives for _partials/pyproject.md (../../../, one less directory level)
  • update docs/pages/ path references in noxfile.py and .pre-commit-config.yaml
  • update the prose in docs/README.md describing where pages live

Trade-off

The /development/pages/… URLs that have been live since the mystmd conversion will now 404. This restores the long-lived, widely-shared original URLs instead, which is the priority. If we'd rather keep both working, we could add a build-time redirect step instead — happy to do that on request.

Verification

  • clean bun run build — no errors or unresolved-link warnings; output URLs are back to guides/style/, guides/mypy/, etc. with no pages/ segment
  • prek -a all green
  • pytest — 245 passed, 1 skipped

📚 Documentation preview 📚: https://scientific-python-cookie--814.org.readthedocs.build/

The mystmd conversion nested every page under `pages/`, which added a
`pages/` segment to all guide URLs (e.g.
`/development/guides/mypy/` became `/development/pages/guides/mypy/`),
breaking existing links into the development guide.

Move the page tree back up one level so the URLs match the pre-mystmd
paths and old links work again:

- `git mv docs/pages/{guides,tutorials,principles,patterns,index.md}` to
  `docs/`
- strip `pages/` from the toc in myst.yml and from internal
  cross-reference links
- adjust the real `{include}` directives for `_partials/pyproject.md`
  (one less directory level)
- update `docs/pages/` path references in noxfile.py and
  .pre-commit-config.yaml

Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii henryiii merged commit dc834bb into main Jun 23, 2026
34 checks passed
@henryiii henryiii deleted the claude/objective-nash-e43585 branch June 23, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant